﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace My3DGame
{
    class clsErrorMsgHelper
    {
        static public List<string> ErrorList = new List<string>();

        static public void WriteError(string nError)
        {
            System.Diagnostics.Debug.WriteLine(nError);
            ErrorList.Add(nError);
        }
        static public void Draw(SpriteBatch nSpriteBatch, SpriteFont nFont, Game1 game1)
        {
            nSpriteBatch.Begin();
            int y = 10;
            foreach (string str in ErrorList)
            {
                nSpriteBatch.DrawString(nFont, str, new Vector2(10, y), Color.White);
                y += nFont.LineSpacing;
            }
            nSpriteBatch.End();
        }
    }
}
